package com.javatest.springbootactivemq.config;

import javax.jms.Topic;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA. Description:
 *
 * @author lzy
 * @create 2019-12-03 上午9:43
 */
@Configuration
public class TopicConfigBean {

  @Value("${mytopic}")
  private String topicName;

  @Bean
  public Topic topic() {
    return new ActiveMQTopic(topicName);
  }
}
